<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>前端工具类</title>
</head>
<body>
  <div id="box" style="width:100px;height:100px;background:#ccc;position:absolute"></div>
</body>
<script src="app.js"></script>
<script src="zxx.drag.1.0.js"></script>
<script>
var dom = document.getElementById('box')
startDrag(dom, dom)
var a= `859
835
764
688
630
475
471
450
366
310
304
294
292
285
267
266
257
243
228
222
215
213
118
83
293
161
82`
var ab = [{
    id:1,
    name:'测试1'
  },{
    id:5,
    name:'测试1'
  },{
    id:1,
    name:'测试1'
  },{
    id:2,
    name:'测试2'
  },{
    id:3,
    name:'测试3'
  }]
var ac = ['P',1,2,'A',8,3,4,5,6,4,'q','a',5,6,4,5,6,5,8,7,9,5,3,2,0,3,6,9,.3,6,.4,.9,1.1]
console.log('匹配度：'+$app.strSimilarity2Percent('中国工商银行','中国建设银行(上海福建路支行)'))
console.log($app.sort($app.unique(ab,'id'),'id'))
console.log($app.sort($app.unique(ac)))
console.log($app.unique(ac))
console.log($app.distinct(ac))
console.log($app.objArr(ab,'id',4))
console.log($app.contain(ab,'id',4))
console.log('时间格式化：'+$app.format_time_stamp('yyyy-MM-dd I',new Date()))
console.log('小数点格式化：'+$app.MathFormaFloat((0.1+0.2),3))
console.log('是否存在：'+$app.contain(ac,4))
console.log('数据类型：'+$app.type(11))
console.log('当前字节数：'+$app.GetLength('11'))
console.log(a.replace(/\s+/g,','))
console.log('编码为:'+encodeURI('测试'))
console.log('解码为:'+decodeURI('%E6%B5%8B%E8%AF%95'))
console.log($app.regular)
console.log($app.remSpace('去空格   结果 为'))
</script>
</html>
